package mysql

import "gorm.io/gorm"

type Collect struct {
	gorm.Model
	UserId   int64  `gorm:"type:int(11)" json:"UserId,omitempty"`
	HouseId  int64  `gorm:"type:int(11)" json:"HouseId,omitempty"`
	Collexts string `gorm:"type:varchar(20)" json:"Collexts,omitempty"`
}

func (c *Collect) Create() error {
	return DB.Create(&c).Error
}
func (c *Collect) Find() error {
	return DB.Where("user_id = ?", c.UserId).Find(&c).Error
}
